home *** CD-ROM | disk | FTP | other *** search
-
- > >Unfortunately, there's quite a difference between bumping into walls and
- > >actually avoiding them in the first place. Path finding algorithms are needed
- > >to prevent monsters from trying to walk through walls to get to their target
-
- > I know almost nothing about this wall collision thing and you are realy talking
- > about sonmething different, but it can't be that hard can it? :-)
-
- It's harder than anything else done so far - but fortunately there is very little
- of it so this balances things out a bit.
-
- Anyone who thinks it is actually 'easy' can be filed under one of the following:
-
- 1) Has not investigated it properly yet.
- 2) Has already aquired the code from somewhere without needing to think about it.
- 3) Understands the maths, but doesn't have to write the code at the end of the day.
-
- Nuff said. :)
-
- > I mean, you know how the map look as I can enter 'map mode' and I can see
- > all the walls and where the player is. Why not just see if I'm about to cross
- > a wall on a 'invisible map' and if I'm, stop the player??
-
- But your brain is a neural associator. It's good at looking at things and knowing
- automatically what is likely to happen and where. Computers are stupid. They need
- nice friendly rules. If a monster needs to navigate through a u-shaped room, it
- needs to 'know' where the walls are before it makes a move, otherwise it tries to
- take a shortcut - through a wall, or something just as equally stupid.
-
- In order to know where the walls are, you need to check the nearest few against
- the player on a regular basis - or at the very least, during every decision made
- by the object. This is part of the AI. If this is not used, monsters will walk
- up to walls they cannot expect to be able to pass through and just stop there,
- confused and incapable of action. They may even get completely stuck if the
- collision system relies on yes/no tests instead of vector-magnitude 'predictions'
- which are essential for reliable 3D interactions.
-
- The most effective method by far is a simple networking algorithm backed up by some
- scattered 'nodes' which are like meeting points at the centre of each sector.
- Monsters will try to navigate from one meeting point to another, ignoring the
- walls completely. The meeting points are not strict, but act as guides for the
- monsters to 'show' them where they should be walking to avoid embarrasment. They
- may sometimes bump into a doorway, pillar or wall - but no more often than the
- average player.
-
- I'm sure Quake uses something along these lines, but even it ends up with monsters
- stuck in doorways and other sillyness. It's quite a serious problem really.
-
- > You would also need to look at the height of the next sector and if the wall
- > is walk through able, but that can't be very hard either.
-
- The height test is easy - but that's not the problem.
-
- > Well, it looks like I have made a antighost routine in 30 secondes! :-))
-
- If only. :)
-
- > Hmm.. I'm probably talking noncense. :-)
-
- :)
-
- > Sounds good enough to me. If they are realy stupied I might even manage to
- > get trough a level! :-)
-
- The real trick is not actually to make them 'clever' - that just gets really
- annoying. What you want is enemies that aren't so stupid they manage to get
- themselves trapped or killed for no reason other than they don't know any
- better. Lots of games suffer from this and it looks pathetic during play.
-
- Games with enemies that are too clever tend to be too difficult. After all,
- there are hundreds of them and only one of you - the odds have to be even.
-
- :)
-
- Doug.
-
-
-